package com.org.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.org.bean.system.TunnelInfo;
import com.org.dao.system.TunnelInfoMapper;
import com.org.service.TunnelService;

@Service("tunnelService")
public class TunnelServiceimpl implements TunnelService {
	@Autowired
	private TunnelInfoMapper tunnelInfoMapper;

	@Override
	public List<TunnelInfo> findAll() {
		// TODO Auto-generated method stub
		return tunnelInfoMapper.findAll();
	}

	@Override
	public List<TunnelInfo> findByName(String tunnelName) {
		// TODO Auto-generated method stub
		return tunnelInfoMapper.findByName(tunnelName);
	}

	@Override
	public boolean addTunnel(TunnelInfo tunnelInfo) {
		// TODO Auto-generated method stub
		return tunnelInfoMapper.addTunnel(tunnelInfo);
	}

	@Override
	public boolean deleteTunnel(int tunnelId) {
		// TODO Auto-generated method stub
		return tunnelInfoMapper.deleteTunnel(tunnelId);
	}

	@Override
	public boolean updateTunnel(TunnelInfo tunnelInfo) {
		// TODO Auto-generated method stub
		return tunnelInfoMapper.updateTunnel(tunnelInfo);
	}

	@Override
	public void updateRemark(TunnelInfo tunnelInfo) {
		// TODO Auto-generated method stub
		tunnelInfoMapper.updateRemark(tunnelInfo);
	}
	
	@Override
	public int findId(String tunnelName) {
		// TODO Auto-generated method stub
		return tunnelInfoMapper.findId(tunnelName);
	}

	@Override
	public List<TunnelInfo> findRemark(int tunnelId) {
		// TODO Auto-generated method stub
		return tunnelInfoMapper.findRemark(tunnelId);
	}

}
